package string;

public class StrTrim {
    public static void main(String[] args) {
        /**
         * 去除字符串两端的空格，不能去除字符串中的空格
         */
        String str = "   I Like Learn Java  ";
        System.out.println(str);
        String str1 = str.trim();
        System.out.println(str1);

        String str2 = "    123456";
        str2 = str2.trim();
        System.out.println(str2);
    }
}
